OSCAR¶Alexej Jordan (TU Berlin)
13th polymake conference and developer meeting - 2022-01-21
OSCAR¶julia packagejuliaPolymake.jlCone, mask polymake BigObjectsstruct Cone
pm_cone::Polymake.BigObject
end
Polymake.jldim(C::Cone) = pm_object(C).CONE_DIM::Int
OSCAR) vs. Homogeneous (polymake/Polymake.jl)Pos = Polyhedron([-1 0 0; 0 -1 0; 0 0 -1], [0, 0, 0])
println(vertices(Pos))
println(rays(Pos))
println()
println(Oscar.pm_object(Pos).VERTICES)
PointVector{Polymake.Rational}[[0, 0, 0]]
RayVector{Polymake.Rational}[[1, 0, 0], [0, 1, 0], [0, 0, 1]]
pm::Matrix<pm::Rational>
0 1 0 0
0 0 1 0
0 0 0 1
1 0 0 0
OSCAR typesCone, Polyhedron, PolyhedralFan, SubdivisonOfPointspolymake's serializationpolymake's visualizationc = cross(3)
i = intersect(c, Pos)
println(isbounded(i))
println(vertices(i))
true
PointVector{Polymake.Rational}[[0, 0, 1], [0, 1, 0], [1, 0, 0], [0, 0, 0]]
es = convex_hull(vertices(i), [-1 0 0])
facets(es)
4-element SubObjectIterator{AffineHalfspace}:
The Halfspace of R^3 described by
1: x₂ + x₃ ≦ 1
The Halfspace of R^3 described by
1: -x₂ ≦ 0
The Halfspace of R^3 described by
1: -x₃ ≦ 0
The Halfspace of R^3 described by
1: x₁ + x₂ + x₃ ≦ 1
OSCAR $\longleftarrow$ Polymake.jl $\longleftarrow$ libpolymake_julia $\longleftarrow$ polymake
juliaactivate desired environment (using Pkg)dev Oscar/dev Polymake (using Pkg) to clone the repository and to use the local version in the current environmentgit repositorygithub¶README and the documentationOSCAR now has a dev cornerOSCAR CI also performs tests across repositories for equally named branchesOSCAR using Polymake.jl¶Polymake from Polymake.jl is loaded in the context of OSCARpolymake features are available directly from Polymake.jl:BigObjects and functions are located within the respective sub-modulejulia's .-syntaxsimp = Polymake.polytope.Polytope(FACETS = [0 1 0; 0 0 1; 1 -1 -1])
println(simp.VERTICES)
println(Polymake.polytope.dim(simp))
pm::Matrix<pm::Rational> 1 1 0 1 0 1 1 0 0 2
pm macrosimpQE = Polymake.@pm polytope.Polytope{QuadraticExtension}(VERTICES = [1 0 0; 1 1 0; 1 0 1])
1 0 0 1 1 0 1 0 1
PropertyValue which can be received and passed unalteredsimpQE.VERTICES
PropertyValue wrapping pm::Matrix<pm::QuadraticExtension<pm::Rational> > 1 0 0 1 1 0 1 0 1
simpQE.VERTICES[1, 1]
MethodError: no method matching getindex(::Polymake.PropertyValueAllocated, ::Int64, ::Int64) Closest candidates are: getindex(::Any, ::Oscar.StraightLinePrograms.LazyRec) at /home/jordan/.julia/packages/Oscar/iRpOQ/StraightLinePrograms/src/lazy.jl:562 getindex(::Any, ::Oscar.StraightLinePrograms.Lazy) at /home/jordan/.julia/packages/Oscar/iRpOQ/StraightLinePrograms/src/lazy.jl:111 Stacktrace: [1] top-level scope @ In[8]:1 [2] eval @ ./boot.jl:373 [inlined] [3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String) @ Base ./loading.jl:1196
libpolymake_julia types and methods are linked from C++ to julia using C++ codepolymake callable librarylibpolymake_julia_jlljulia artifacts to use local buildPolymake.jl¶Polymake.jl data processing on julia side is definedpolymake from within julia, not adding new featuresjulia conventionsjulia to produce generic code and reduce wrapping:Gatherjulia packages Revise and Test can save valuable time